import { Brush } from './brush.js';

// const positions = [{"x":82,"y":361,"t":1614403428005},{"x":82,"y":360,"t":1614403428265},{"x":83,"y":355,"t":1614403428270},{"x":87,"y":350,"t":1614403428279},{"x":102,"y":325,"t":1614403428290},{"x":122,"y":299,"t":1614403428294},{"x":150,"y":264,"t":1614403428304},{"x":192,"y":217,"t":1614403428311},{"x":239,"y":172,"t":1614403428318},{"x":294,"y":125,"t":1614403428327},{"x":349,"y":85,"t":1614403428335}];

// const positions = [
//   {"x":113,"y":358,"t":1614414603610},{"x":113,"y":356,"t":1614414603773},{"x":114,"y":350,"t":1614414603780},{"x":118,"y":337,"t":1614414603788},{"x":132,"y":307,"t":1614414603796},{"x":147,"y":278,"t":1614414603805},{"x":166,"y":247,"t":1614414603812},{"x":191,"y":211,"t":1614414603821},
//   {"x":202,"y":198,"t":1614414603828},
//   {"x":229,"y":167,"t":1614414603837},
//   {"x":255,"y":141,"t":1614414603844},
//   {"x":265,"y":134,"t":1614414603853},
//   {"x":291,"y":113,"t":1614414603889},{"x":317,"y":93,"t":1614414603906},{"x":321,"y":92,"t":1614414603911},{"x":322,"y":91,"t":1614414603917},{"x":323,"y":90,"t":1614414603926},{"x":324,"y":90,"t":1614414603933},{"x":324,"y":90,"t":1614414603941},{"x":324,"y":90,"t":1614414603949}
// ];

// const positions = [
//   {"x":224,"y":223,"t":1614416419053},
//   {"x":224,"y":195,"t":1614416419060},
//   {"x":224,"y":164,"t":1614416419070},
//   {"x":224,"y":138,"t":1614416419076},
//   {"x":224,"y":128,"t":1614416419085},{"x":224,"y":106,"t":1614416419092},
//   {"x":224,"y":101,"t":1614416419100},{"x":224,"y":89,"t":1614416419108},
//   {"x":224,"y":88,"t":1614416419116},{"x":224,"y":81,"t":1614416419124},
//   {"x":224,"y":77,"t":1614416419132},{"x":224,"y":74,"t":1614416419140},
//   {"x":224,"y":73,"t":1614416419148},{"x":224,"y":72,"t":1614416419156},
//   {"x":224,"y":72,"t":1614416419165},{"x":224,"y":72,"t":1614416419302},
//   {"x":224,"y":74,"t":1614416419309},{"x":226,"y":76,"t":1614416419318}
// ]

const positions = [{"x":65,"y":382,"t":1614431078537},{"x":65,"y":382,"t":1614431078667},{"x":65,"y":377,"t":1614431078673},{"x":67,"y":371,"t":1614431078681},{"x":72,"y":359,"t":1614431078690},{"x":81,"y":345,"t":1614431078697},{"x":104,"y":310,"t":1614431078706},{"x":123,"y":284,"t":1614431078713},{"x":145,"y":258,"t":1614431078721},{"x":172,"y":227,"t":1614431078729},{"x":201,"y":198,"t":1614431078737},{"x":211,"y":187,"t":1614431078745},{"x":236,"y":163,"t":1614431078754},{"x":243,"y":156,"t":1614431078761},{"x":248,"y":151,"t":1614431078771},{"x":253,"y":147,"t":1614431078777},{"x":262,"y":139,"t":1614431078788},{"x":268,"y":134,"t":1614431078793},{"x":272,"y":131,"t":1614431078804},{"x":274,"y":128,"t":1614431078809},{"x":275,"y":128,"t":1614431078817},{"x":276,"y":128,"t":1614431078825}]

const canvas = document.querySelector('#canvas');
const ctx = canvas.getContext('2d');
const brush = new Brush(ctx);

// brush.draw(positions);

brush.drawCurve(positions);



